#include <pthread.h>
#include <semaphore.h>
#include <stdio.h>
#include <math.h>


int prime(long long unsigned int n) {
    int j;
    int isPrime = 1;
    for (j=2; j<=n/2; j++) {
        if((n%j)==0) {
            isPrime = 0;
            break;
        }
    }
    return isPrime;
}

int main(int argc, int *argv[]) {
    long long unsigned int Lower = atoi(argv[1]);
    long long unsigned int Upper = atoi(argv[2]);
    long long unsigned int i,p;
    for (i=Lower; i<=Upper; i++) {
//	printf("%d\n",i);
        p=prime(i);
        if(p==1) {
            printf("%d \n",i);
        }
    }
}
